package com.imooc.api.controller.user;

import com.imooc.grance.result.GraceJsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(value = "MyFansControllerApi",tags = "粉丝，关注，相关功能的controller")
@RequestMapping("fans")
public interface MyFansControllerApi {


    @ApiOperation(value = "验证是否已经关注的接口",notes = "验证是否已经关注的接口",httpMethod = "POST")
    @PostMapping("/isMeFollowThisWriter")
    public GraceJsonResult isMeFollerThisWriter(@RequestParam String fanId,
                                                @RequestParam String writerID);

    @ApiOperation(value = "粉丝关注作家", notes = "粉丝关注作家", httpMethod = "POST")
    @PostMapping("/follow")
    public GraceJsonResult follow(String writerId, String fanId);

    @ApiOperation(value = "用户取消关注", notes = "用户取消关注", httpMethod = "POST")
    @PostMapping("/unfollow")
    public GraceJsonResult unfollow(String writerId, String fanId);


    @ApiOperation(value = "获取粉丝列表", notes = "获取粉丝列表", httpMethod = "POST")
    @PostMapping("/queryAll")
    public GraceJsonResult queryAll(@RequestParam String writerId,
                                    @RequestParam Integer page,
                                    @RequestParam Integer pageSize);

    @ApiOperation(value = "查询男女粉丝画像", notes = "粉丝画像", httpMethod = "POST")
    @PostMapping("/queryRatio")
    public GraceJsonResult queryRatio(@RequestParam String writerId);

    @ApiOperation(value = "根据地域显示粉丝数量", notes = "根据地域显示粉丝数量", httpMethod = "POST")
    @PostMapping("/queryRatioByRegion")
    public GraceJsonResult queryRatioByRegion(@RequestParam String writerId);
}
